package pl.edu.uj.tcs.hkextended;

public class SuggestItem implements Comparable<SuggestItem> {
	private String suggest;
	private int priority;
	
	public SuggestItem() {
		this.suggest = null;
		this.priority = 0;
	}
	
	public SuggestItem(String suggest, int priority) {
		this.suggest = suggest;
		this.priority = priority;
	}
	
	public String getSuggest() {
		return suggest;
	}
	
	public int getPriority() {
		return priority/1000000;
	}
	
	public void setSuggest(String suggest) {
		this.suggest = suggest;
	}
	
	public void setPriority(int priority) {
		this.priority = priority;
	}
	
	
	@Override
	public int compareTo(SuggestItem other) {
		if (this == other) return 0;
		else return this.priority - other.priority;
	}
	
}
